#include<bits/stdc++.h>
using namespace std;
multiset<int> factors;
const int N = 10;
void factorize(int x) {
  for(int i=2; i<=x; ++i) {
    while(x%i==0) {
      factors.insert(i);
      x/=i;
    }
  }
}
int main() {
  for(int i=2; i<=N; ++i)
    factorize(i);
  int ans=1;
  for(auto it=factors.begin(),ed=factors.end();it!=ed;++it)
    cout<<*it<<endl,ans*=*it;
  cout<<ans<<endl;
}
